<template>
  <div>
    <div>{{ token }}</div>
    <el-button>以下是接口返回值</el-button>
    <div></div>
    <ul>
      <li v-for="(item, index) in messageInfos" :key="index">
        {{ item.messageContent }}
      </li>
    </ul>
  </div>
</template>

<script>
import { mapState } from "vuex";
import { getHomeData } from "@/api/test/test";
export default {
  name: "Home",
  computed: {
    ...mapState("user", ["token"]),
  },
  data() {
    return {
      messageInfos: [],
    };
  },
  mounted() {
    getHomeData().then((res) => {
      this.messageInfos = res.messageInfos || [];
    });
  },
};
</script>

<style scoped lang="less">
div {
  word-break: break-all;
}
</style>
